package com.qige.homework;

/**
 * @Author qige
 * @Date 2024-08-06 20:15
 * @Description
 */
public class homework4 {
    /*
    实现字符串和字节数组之间的相互转换。必如将字符串“湖北软帝”转换为字节数组，并将字节数组再转换回字符串。
     */
    public static void main(String[] args) {
        String str = "湖北软帝";
        byte[] bytes = str.getBytes();
        System.out.println(new String(bytes));
    }
}
